package org.mixed.core.event;

import lombok.Getter;
import lombok.Setter;
import org.mixed.core.resource.Info;
import org.mixed.core.resource.info.GroupInfo;

import java.util.Collections;
import java.util.List;

@Getter
@Setter
public class GroupEvent extends MixEvent {
	/**
	 * 分组信息
	 */
	private GroupInfo group;

	/**
	 * 子分组
	 */
	private List<Info> entities;

	public GroupEvent(String type, EventAction action, GroupInfo group) {
		this(type, action, group, Collections.emptyList());
	}

	public GroupEvent(String type, EventAction action, GroupInfo group, List<Info> entities) {
		super(type, action);
		this.group = group;
		this.entities = entities;
	}
}
